package com.reggie.setmeal.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.reggie.setmeal.entity.Setmeal;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface SetmealDao extends BaseMapper<Setmeal> {

    @Update("UPDATE setmeal SET status = #{status} WHERE `id` = #{id}; ")
    void updateStatus(Long id, int status);

    @Select("select * from setmeal where id = #{setmealId} and is_deleted = 0")
    Setmeal selectSetmealNameById(Long setmealId);
}
